.danmaku-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.danmaku-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.danmaku-item {
  position: absolute;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  animation: danmaku-move linear;
  will-change: transform;
  right: 0;
  /* 从右边开始 */
  transform: translateX(0);
  /* 初始位置在右边边缘 */
}

@keyframes danmaku-move {
  from {
    transform: translateX(0);
    /* 从右边开始 */
  }

  to {
    transform: translateX(-100vw);
    /* 移动到左边屏幕外 */
  }
}

.danmaku-control {
  position: absolute;
  bottom: 90px;
  right: 18%;
  width: 40%;
  padding: 0 10px;
  z-index: 20;
  background: none;
  opacity: 0.8;
}

.danmaku-input-area {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.danmaku-input-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.danmaku-settings {
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  padding: 5px;
  margin-top: 10px;
  color: wheat;
  width: 100%;
  max-width: 500px;
  margin: 10px auto 0;
}

.setting-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.setting-item span {
  width: 80px;
  margin-right: 10px;
}

.setting-item .ant-slider {
  flex: 1;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .danmaku-item {
    font-size: 16px;
  }
  .danmaku-control {
    right: 12px;
    left: 12px;
    width: calc(100% - 24px);
    bottom: 72px;
    opacity: 0.95;
  }
  .danmaku-input-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .danmaku-settings {
    max-width: none;
  }
  .setting-item span {
    width: 70px;
  }
}